﻿@using Util.Domains.Contexts
@{
    var x = @Html.EasyUi();
}

<script type="text/javascript">
    //刷新
    var shared_refresh = function () {
        location.href = "/";
    }

    //登出
    var shared_logout = function () {
        $.easyui.confirm("您确定登出吗?", function () {
            $.ajax({
                type: "POST",
                url: "/authentication/logout",
                dataType: "json",
                success: function (result) {
                    if (result.Code === 1) {
                        location.href = "/";
                        return;
                    }
                },
                error: function () {
                    $.easyui.warn("系统繁忙，请稍后再试");
                }
            });
        }, "确认");
    }
</script>

<div class="easyui-accordion" data-options="multiple:true">
    <div title="用户信息" data-options="iconCls:'icon-user',collapsed:false" style="overflow: auto;">
        <div class="divDetail">
            <table style="font-size: 10px;">
                <tr>
                    <td>@ApplicationContext.User.ApplicationName</td>
                </tr>
                <tr>
                    <td colspan="2"><div class="line"></div></td>
                </tr>
                <tr>
                    <td>账户：</td>
                    <td>@ApplicationContext.User.UserName</td>
                </tr>
            </table>
            <br />
            <dl>
                <dt>
                    @x.Button("刷新").Icon("icon-refresh").Click("shared_refresh()")
                    @x.Button("登出").Icon("icon-delete4").Click("shared_logout()").AddStyle("float", "right")
                </dt>
            </dl>
        </div>
    </div>
    <div title="菜单项" data-options="iconCls:'icon-save',collapsed:false" style="overflow: auto;">
        @Html.EasyUi().Tree("/Home/GetModules", "divMenuTree").Click("$.project.clickMainMenuNode")
    </div>
</div>